package com.taijihuabao.modules.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.taijihuabao.common.commonutils.LongToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

/**
 * 菜单角色中间表
 * @author Wang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@ApiModel("菜单角色中间表")
public class MenuRoleEntity extends BaseEntity {

    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long id;

    /**
     * 菜单id
     */
    @ApiModelProperty(value = "菜单id")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long mid;

    /**
     * 角色id
     */
    @ApiModelProperty(value = "角色id")
    @JsonSerialize(using = LongToStringSerializer.class)
    private Long rid;

    public MenuRoleEntity() {}

    public MenuRoleEntity(Long mid, Long rid) {
        this.mid = mid;
        this.rid = rid;
    }
}
